-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Fix from chatgpt for promise failure #39295
Conversation
/ci-test-limit-count run_count=50 update_snapshot=false specs_to_run=cypress/e2e/Regression/ClientSide/OtherUIFeatures/ApplicationURL_spec.js |
WalkthroughThe changes modify the URL redirection tests by removing an unnecessary sign-out step and enhancing the verification process. The test now utilizes a stub for the Changes
Sequence Diagram(s)sequenceDiagram
participant Runner as Test Runner
participant Test as ApplicationURL_spec.js
participant Stub as VisitNAssert Stub
participant Logger as Logger
Runner->>Test: Start URL redirection test
Test->>Stub: Call VisitNAssert(redirectUrl)
Stub-->>Test: Return intercepted call
Test->>Logger: Log encoded redirectUrl
Logger-->>Test: Confirm URL format
Possibly related PRs
Suggested reviewers
Poem
✨ Finishing Touches
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/13325372055. |
Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/13325372055.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lgtm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
app/client/cypress/e2e/Regression/ClientSide/OtherUIFeatures/ApplicationURL_spec.js (1)
148-159
: LGTM! Good use of stubbing for URL redirection testing.The changes improve test reliability by:
- Using stubs to avoid actual navigation
- Verifying both the redirection call and URL encoding
- Following Cypress best practices
Consider adding these assertions for completeness:
// Verify URL format cy.wrap(redirectUrl).then((redirectUrl) => { expect(redirectUrl).to.match(/^https?:\/\/.+\?embed=true&a=b$/); });
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
app/client/cypress/e2e/Regression/ClientSide/OtherUIFeatures/ApplicationURL_spec.js
(1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
`app/client/cypress/**/**.*`: Review the following e2e test ...
app/client/cypress/**/**.*
: Review the following e2e test code written using the Cypress test library. Ensure that:
- Follow best practices for Cypress code and e2e automation.
- Avoid using cy.wait in code.
- Avoid using cy.pause in code.
- Avoid using agHelper.sleep().
- Use locator variables for locators and do not use plain strings.
- Use data-* attributes for selectors.
- Avoid Xpaths, Attributes and CSS path.
- Avoid selectors like .btn.submit or button[type=submit].
- Perform logins via API with LoginFromAPI.
- Perform logout via API with LogOutviaAPI.
- Perform signup via API with SignupFromAPI.
- Avoid using it.only.
- Avoid using after and aftereach in test cases.
- Use multiple assertions for expect statements.
- Avoid using strings for assertions.
- Do not use duplicate filenames even with different paths.
- Avoid using agHelper.Sleep, this.Sleep in any file in code.
app/client/cypress/e2e/Regression/ClientSide/OtherUIFeatures/ApplicationURL_spec.js
⏰ Context from checks skipped due to timeout of 90000ms (7)
- GitHub Check: perform-test / rts-build / build
- GitHub Check: perform-test / client-build / client-build
- GitHub Check: perform-test / server-build / server-unit-tests
- GitHub Check: client-unit-tests / client-unit-tests
- GitHub Check: client-lint / client-lint
- GitHub Check: client-prettier / prettier-check
- GitHub Check: client-build / client-build
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lgtm
Description
Tip
Add a TL;DR when the description is longer than 500 words or extremely technical (helps the content, marketing, and DevRel team).
Please also include relevant motivation and context. List any dependencies that are required for this change. Add links to Notion, Figma or any other documents that might be relevant to the PR.
Fixes #
Issue Number
or
Fixes
Issue URL
Warning
If no issue exists, please create an issue first, and check with the maintainers if the issue is valid.
Automation
/ok-to-test tags="@tag.AppUrl"
🔍 Cypress test results
Tip
🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/13363538162
Commit: 0701248
Cypress dashboard.
Tags:
@tag.AppUrl
Spec:
Mon, 17 Feb 2025 05:49:10 UTC
Communication
Should the DevRel and Marketing teams inform users about this change?
Summary by CodeRabbit
Summary by CodeRabbit